3.2.7 \(\int \frac {\sin (a+\frac {b}{x})}{x^2} \, dx\) [107]

Optimal. Leaf size=12 \[ \frac {\cos \left (a+\frac {b}{x}\right )}{b} \]

[Out]

cos(a+b/x)/b

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 12, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3460, 2718} \begin {gather*} \frac {\cos \left (a+\frac {b}{x}\right )}{b} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sin[a + b/x]/x^2,x]

[Out]

Cos[a + b/x]/b

Rule 2718

Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Cos[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 3460

Int[(x_)^(m_.)*((a_.) + (b_.)*Sin[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplif
y[(m + 1)/n] - 1)*(a + b*Sin[c + d*x])^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IntegerQ[Simpl
ify[(m + 1)/n]] && (EqQ[p, 1] || EqQ[m, n - 1] || (IntegerQ[p] && GtQ[Simplify[(m + 1)/n], 0]))

Rubi steps

\begin {align*} \int \frac {\sin \left (a+\frac {b}{x}\right )}{x^2} \, dx &=-\text {Subst}\left (\int \sin (a+b x) \, dx,x,\frac {1}{x}\right )\\ &=\frac {\cos \left (a+\frac {b}{x}\right )}{b}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 12, normalized size = 1.00 \begin {gather*} \frac {\cos \left (a+\frac {b}{x}\right )}{b} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sin[a + b/x]/x^2,x]

[Out]

Cos[a + b/x]/b

________________________________________________________________________________________

Maple [A]
time = 0.02, size = 13, normalized size = 1.08

method result size
derivativedivides \(\frac {\cos \left (a +\frac {b}{x}\right )}{b}\) \(13\)
default \(\frac {\cos \left (a +\frac {b}{x}\right )}{b}\) \(13\)
risch \(\frac {\cos \left (\frac {a x +b}{x}\right )}{b}\) \(15\)
norman \(\frac {2}{b \left (1+\tan ^{2}\left (\frac {a}{2}+\frac {b}{2 x}\right )\right )}\) \(23\)
meijerg \(-\frac {\sqrt {\pi }\, \cos \left (a \right ) \left (\frac {1}{\sqrt {\pi }}-\frac {\cos \left (\frac {b}{x}\right )}{\sqrt {\pi }}\right )}{b}-\frac {\sin \left (a \right ) \sin \left (\frac {b}{x}\right )}{b}\) \(40\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(a+b/x)/x^2,x,method=_RETURNVERBOSE)

[Out]

cos(a+b/x)/b

________________________________________________________________________________________

Maxima [A]
time = 0.28, size = 12, normalized size = 1.00 \begin {gather*} \frac {\cos \left (a + \frac {b}{x}\right )}{b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(a+b/x)/x^2,x, algorithm="maxima")

[Out]

cos(a + b/x)/b

________________________________________________________________________________________

Fricas [A]
time = 0.39, size = 14, normalized size = 1.17 \begin {gather*} \frac {\cos \left (\frac {a x + b}{x}\right )}{b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(a+b/x)/x^2,x, algorithm="fricas")

[Out]

cos((a*x + b)/x)/b

________________________________________________________________________________________

Sympy [A]
time = 0.33, size = 14, normalized size = 1.17 \begin {gather*} \begin {cases} \frac {\cos {\left (a + \frac {b}{x} \right )}}{b} & \text {for}\: b \neq 0 \\- \frac {\sin {\left (a \right )}}{x} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(a+b/x)/x**2,x)

[Out]

Piecewise((cos(a + b/x)/b, Ne(b, 0)), (-sin(a)/x, True))

________________________________________________________________________________________

Giac [A]
time = 3.49, size = 14, normalized size = 1.17 \begin {gather*} \frac {\cos \left (\frac {a x + b}{x}\right )}{b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(a+b/x)/x^2,x, algorithm="giac")

[Out]

cos((a*x + b)/x)/b

________________________________________________________________________________________

Mupad [B]
time = 4.53, size = 12, normalized size = 1.00 \begin {gather*} \frac {\cos \left (a+\frac {b}{x}\right )}{b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(a + b/x)/x^2,x)

[Out]

cos(a + b/x)/b

________________________________________________________________________________________